<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <style media="screen">
    .box {width:200px; height:200px;background:#CCC;position:absolute;left:0;top:0;}
    </style>
    <script>
    function touchDrag(oBox){
      var oS=document.getElementById('s1');

      oBox.addEventListener('touchstart', function (ev){
        var disX=ev.targetTouches[0].pageX-oBox.offsetLeft;
        var disY=ev.targetTouches[0].pageY-oBox.offsetTop;

        function fnMove(ev){
          oS.innerHTML=ev.targetTouches.length;

          oBox.style.left=ev.targetTouches[0].pageX-disX+'px';
          oBox.style.top=ev.targetTouches[0].pageY-disY+'px';

          ev.preventDefault();
        }
        function fnEnd(){
          oBox.removeEventListener('touchmove', fnMove, false);
          oBox.removeEventListener('touchend', fnEnd, false);
        }

        oBox.addEventListener('touchmove', fnMove, false);
        oBox.addEventListener('touchend', fnEnd, false);

        ev.preventDefault();
      }, false);
    }

    window.onload=function (){
      var aBox=document.getElementsByTagName('div');

      for(var i=0;i<aBox.length;i++){
        touchDrag(aBox[i]);
      }
    };
    </script>
  </head>
  <body>
    <span id="s1"></span>
    <div class="box" style="background:#FA0;"></div>
    <div class="box" style="background:#0FA; left:200px; top:50px;"></div>
    <div class="box" style="background:#A0F; left:100px; top:150px;"></div>
  </body>
</html>
